package com.motherchild.user.service.impl;

import com.motherchild.user.dto.User;
import com.motherchild.user.mapper.UserMapper;
import com.motherchild.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author zhuchenxu
 * @create 2025-03-14-16:39
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public User getUserInfo(Long userId) {
        return userMapper.getUserInfo(userId);
    }

    @Override
    public void updateUserInfo(User user) {
        userMapper.updateUserInfo(user);
    }

    @Override
    public boolean updatePassword(Long userId, String newPassword) {
        return userMapper.updatePassword(userId, newPassword);
    }
}
